<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Geo3DML-CPP: include/geo3dml/Vector3D.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Geo3DML-CPP
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_acc7f90eaa859a07dba55a8b62805b11.html">geo3dml</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">Vector3D.h</div></div>
</div><!--header-->
<div class="contents">
<a href="_vector3_d_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">// UTF-8编码</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacegeo3dml.html">geo3dml</a> {</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span> </div>
<div class="foldopen" id="foldopen00006" data-start="{" data-end="};">
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html">    6</a></span>    <span class="keyword">class </span><a class="code hl_class" href="classgeo3dml_1_1_vector3_d.html">Vector3D</a> {</div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span>    <span class="keyword">public</span>:</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html#aa2e28edc74f00093c765b28c3570f462">    8</a></span>        <a class="code hl_function" href="classgeo3dml_1_1_vector3_d.html#aa2e28edc74f00093c765b28c3570f462">Vector3D</a>(<span class="keywordtype">double</span> x = 0, <span class="keywordtype">double</span> y = 0, <span class="keywordtype">double</span> z = 0);</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html#a9d3eb4716374792363e4f648768933c3">    9</a></span>        <a class="code hl_function" href="classgeo3dml_1_1_vector3_d.html#a9d3eb4716374792363e4f648768933c3">Vector3D</a>(<span class="keyword">const</span> <a class="code hl_class" href="classgeo3dml_1_1_vector3_d.html">Vector3D</a>&amp; v);</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html#a98fc59aa127c9269667633d063284e52">   10</a></span>        <a class="code hl_function" href="classgeo3dml_1_1_vector3_d.html#a98fc59aa127c9269667633d063284e52">~Vector3D</a>();</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html#ac227e6b87db32c9aa34695022bc921c9">   12</a></span>        <a class="code hl_class" href="classgeo3dml_1_1_vector3_d.html">Vector3D</a>&amp; <a class="code hl_function" href="classgeo3dml_1_1_vector3_d.html#ac227e6b87db32c9aa34695022bc921c9">operator=</a>(<span class="keyword">const</span> <a class="code hl_class" href="classgeo3dml_1_1_vector3_d.html">Vector3D</a>&amp; v);</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html#a29a864e9af9c227251fd719d32b8c442">   14</a></span>        <span class="keywordtype">double</span> <a class="code hl_function" href="classgeo3dml_1_1_vector3_d.html#a29a864e9af9c227251fd719d32b8c442">X</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html#a8f37dd0441b7e3db01e8c3331b954092">   15</a></span>        <span class="keywordtype">double</span> <a class="code hl_function" href="classgeo3dml_1_1_vector3_d.html#a8f37dd0441b7e3db01e8c3331b954092">Y</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html#a4c2bd2a46302a8a93038d4c247b2ca97">   16</a></span>        <span class="keywordtype">double</span> <a class="code hl_function" href="classgeo3dml_1_1_vector3_d.html#a4c2bd2a46302a8a93038d4c247b2ca97">Z</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html#ab9962e7b677124574a54812472ebbc80">   18</a></span>        <a class="code hl_class" href="classgeo3dml_1_1_vector3_d.html">Vector3D</a>&amp; <a class="code hl_function" href="classgeo3dml_1_1_vector3_d.html#ab9962e7b677124574a54812472ebbc80">X</a>(<span class="keywordtype">double</span> x);</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html#a02a98d3a9a94f06b63d255f724de4127">   19</a></span>        <a class="code hl_class" href="classgeo3dml_1_1_vector3_d.html">Vector3D</a>&amp; <a class="code hl_function" href="classgeo3dml_1_1_vector3_d.html#a02a98d3a9a94f06b63d255f724de4127">Y</a>(<span class="keywordtype">double</span> y);</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html#a5ce57cefaf57d7f4ec62503b6dc35342">   20</a></span>        <a class="code hl_class" href="classgeo3dml_1_1_vector3_d.html">Vector3D</a>&amp; <a class="code hl_function" href="classgeo3dml_1_1_vector3_d.html#a5ce57cefaf57d7f4ec62503b6dc35342">Z</a>(<span class="keywordtype">double</span> z);</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html#a213897fcbb6ed8de7f1fd8fee7010ef4">   22</a></span>        <span class="keywordtype">double</span> <a class="code hl_function" href="classgeo3dml_1_1_vector3_d.html#a213897fcbb6ed8de7f1fd8fee7010ef4">LengthSquared</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html#affcc0ff23b943418ad0edd005ab8ac99">   23</a></span>        <span class="keywordtype">double</span> <a class="code hl_function" href="classgeo3dml_1_1_vector3_d.html#affcc0ff23b943418ad0edd005ab8ac99">Length</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html#a59c0ce1adcbcb1a4dc1a8978da2eae20">   27</a></span>        <a class="code hl_class" href="classgeo3dml_1_1_vector3_d.html">Vector3D</a> <a class="code hl_function" href="classgeo3dml_1_1_vector3_d.html#a59c0ce1adcbcb1a4dc1a8978da2eae20">UnitVector</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span>    <span class="keyword">private</span>:</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="classgeo3dml_1_1_vector3_d.html#aa6e26bbc87b407fa944e964e8eb10011">   30</a></span>        <span class="keywordtype">double</span> <a class="code hl_variable" href="classgeo3dml_1_1_vector3_d.html#aa6e26bbc87b407fa944e964e8eb10011">x_</a>, <a class="code hl_variable" href="classgeo3dml_1_1_vector3_d.html#a49a5e554ea431149b8aaf8a973668b12">y_</a>, <a class="code hl_variable" href="classgeo3dml_1_1_vector3_d.html#abc6f5292912290d048501509cec725ee">z_</a>;</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span>    };</div>
</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>}</div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html">geo3dml::Vector3D</a></div><div class="ttdef"><b>Definition</b> Vector3D.h:6</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_a02a98d3a9a94f06b63d255f724de4127"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#a02a98d3a9a94f06b63d255f724de4127">geo3dml::Vector3D::Y</a></div><div class="ttdeci">Vector3D &amp; Y(double y)</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_a213897fcbb6ed8de7f1fd8fee7010ef4"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#a213897fcbb6ed8de7f1fd8fee7010ef4">geo3dml::Vector3D::LengthSquared</a></div><div class="ttdeci">double LengthSquared() const</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_a29a864e9af9c227251fd719d32b8c442"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#a29a864e9af9c227251fd719d32b8c442">geo3dml::Vector3D::X</a></div><div class="ttdeci">double X() const</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_a49a5e554ea431149b8aaf8a973668b12"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#a49a5e554ea431149b8aaf8a973668b12">geo3dml::Vector3D::y_</a></div><div class="ttdeci">double y_</div><div class="ttdef"><b>Definition</b> Vector3D.h:30</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_a4c2bd2a46302a8a93038d4c247b2ca97"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#a4c2bd2a46302a8a93038d4c247b2ca97">geo3dml::Vector3D::Z</a></div><div class="ttdeci">double Z() const</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_a59c0ce1adcbcb1a4dc1a8978da2eae20"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#a59c0ce1adcbcb1a4dc1a8978da2eae20">geo3dml::Vector3D::UnitVector</a></div><div class="ttdeci">Vector3D UnitVector() const</div><div class="ttdoc">计算与该向量方向一致的单位向量。</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_a5ce57cefaf57d7f4ec62503b6dc35342"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#a5ce57cefaf57d7f4ec62503b6dc35342">geo3dml::Vector3D::Z</a></div><div class="ttdeci">Vector3D &amp; Z(double z)</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_a8f37dd0441b7e3db01e8c3331b954092"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#a8f37dd0441b7e3db01e8c3331b954092">geo3dml::Vector3D::Y</a></div><div class="ttdeci">double Y() const</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_a98fc59aa127c9269667633d063284e52"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#a98fc59aa127c9269667633d063284e52">geo3dml::Vector3D::~Vector3D</a></div><div class="ttdeci">~Vector3D()</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_a9d3eb4716374792363e4f648768933c3"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#a9d3eb4716374792363e4f648768933c3">geo3dml::Vector3D::Vector3D</a></div><div class="ttdeci">Vector3D(const Vector3D &amp;v)</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_aa2e28edc74f00093c765b28c3570f462"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#aa2e28edc74f00093c765b28c3570f462">geo3dml::Vector3D::Vector3D</a></div><div class="ttdeci">Vector3D(double x=0, double y=0, double z=0)</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_aa6e26bbc87b407fa944e964e8eb10011"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#aa6e26bbc87b407fa944e964e8eb10011">geo3dml::Vector3D::x_</a></div><div class="ttdeci">double x_</div><div class="ttdef"><b>Definition</b> Vector3D.h:30</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_ab9962e7b677124574a54812472ebbc80"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#ab9962e7b677124574a54812472ebbc80">geo3dml::Vector3D::X</a></div><div class="ttdeci">Vector3D &amp; X(double x)</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_abc6f5292912290d048501509cec725ee"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#abc6f5292912290d048501509cec725ee">geo3dml::Vector3D::z_</a></div><div class="ttdeci">double z_</div><div class="ttdef"><b>Definition</b> Vector3D.h:30</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_ac227e6b87db32c9aa34695022bc921c9"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#ac227e6b87db32c9aa34695022bc921c9">geo3dml::Vector3D::operator=</a></div><div class="ttdeci">Vector3D &amp; operator=(const Vector3D &amp;v)</div></div>
<div class="ttc" id="aclassgeo3dml_1_1_vector3_d_html_affcc0ff23b943418ad0edd005ab8ac99"><div class="ttname"><a href="classgeo3dml_1_1_vector3_d.html#affcc0ff23b943418ad0edd005ab8ac99">geo3dml::Vector3D::Length</a></div><div class="ttdeci">double Length() const</div></div>
<div class="ttc" id="anamespacegeo3dml_html"><div class="ttname"><a href="namespacegeo3dml.html">geo3dml</a></div><div class="ttdef"><b>Definition</b> AbstractMetadata.h:6</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
